using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_ReviewTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_ReviewTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_ReviewTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_Review";
			dataTableMapping.ColumnMappings.Add("ShopID", "ShopID");
			dataTableMapping.ColumnMappings.Add("ProductID", "ProductID");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("ReviewsID", "ReviewsID");
			dataTableMapping.ColumnMappings.Add("UserName", "UserName");
			dataTableMapping.ColumnMappings.Add("ReviewTitle", "ReviewTitle");
			dataTableMapping.ColumnMappings.Add("ReviewContent", "ReviewContent");
			dataTableMapping.ColumnMappings.Add("ReviewStar", "ReviewStar");
			dataTableMapping.ColumnMappings.Add("ReviewDate", "ReviewDate");
			dataTableMapping.ColumnMappings.Add("TransSize", "TransSize");
			dataTableMapping.ColumnMappings.Add("ReviewerID", "ReviewerID");
			dataTableMapping.ColumnMappings.Add("ReviewerName", "ReviewerName");
			dataTableMapping.ColumnMappings.Add("ReviewUpdateTimes", "ReviewUpdateTimes");
			dataTableMapping.ColumnMappings.Add("ReviewStatus", "ReviewStatus");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_Review] WHERE (([ReviewsID] = @Original_ReviewsID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_ReviewsID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewsID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_Review] ([ShopID], [ProductID], [UserID], [UserName], [ReviewTitle], [ReviewContent], [ReviewStar], [ReviewDate], [TransSize], [ReviewerID], [ReviewerName], [ReviewUpdateTimes], [ReviewStatus]) VALUES (@ShopID, @ProductID, @UserID, @UserName, @ReviewTitle, @ReviewContent, @ReviewStar, @ReviewDate, @TransSize, @ReviewerID, @ReviewerName, @ReviewUpdateTimes, @ReviewStatus)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ShopID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ShopID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ProductID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ProductID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewTitle", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ReviewTitle", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewContent", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ReviewContent", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewStar", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewStar", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "ReviewDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TransSize", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TransSize", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewerName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ReviewerName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewUpdateTimes", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewUpdateTimes", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ReviewStatus", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewStatus", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_Review] SET [ShopID] = @ShopID, [ProductID] = @ProductID, [UserID] = @UserID, [UserName] = @UserName, [ReviewTitle] = @ReviewTitle, [ReviewContent] = @ReviewContent, [ReviewStar] = @ReviewStar, [ReviewDate] = @ReviewDate, [TransSize] = @TransSize, [ReviewerID] = @ReviewerID, [ReviewerName] = @ReviewerName, [ReviewUpdateTimes] = @ReviewUpdateTimes, [ReviewStatus] = @ReviewStatus WHERE (([ReviewsID] = @Original_ReviewsID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ShopID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ShopID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ProductID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ProductID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "UserName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewTitle", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ReviewTitle", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewContent", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ReviewContent", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewStar", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewStar", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "ReviewDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TransSize", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TransSize", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewerName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ReviewerName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewUpdateTimes", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewUpdateTimes", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ReviewStatus", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewStatus", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_ReviewsID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ReviewsID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[11];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT ShopID, ProductID, UserID, ReviewsID, UserName, ReviewTitle, ReviewContent, \r\n      ReviewStar, ReviewDate, TransSize, ReviewerID, ReviewerName, \r\n      ReviewUpdateTimes, ReviewStatus\r\nFROM HLShop_Review";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE FROM [HLShop_Review] WHERE (([ReviewsID] = @ReviewsID))";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@ReviewsID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ReviewsID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "PR_PageListForAdmin";
			this._commandCollection[2].CommandType = CommandType.StoredProcedure;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@tblName", SqlDbType.VarChar, 255, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@strGetFields", SqlDbType.VarChar, 1000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@fldName", SqlDbType.VarChar, 255, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@PageSize", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@PageIndex", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@OrderType", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@strWhere", SqlDbType.VarChar, 1500, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@Counts", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "pr_GetbargainorReviewCount";
			this._commandCollection[3].CommandType = CommandType.StoredProcedure;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@ReviewerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "pr_GetpurchaserReviewCount";
			this._commandCollection[4].CommandType = CommandType.StoredProcedure;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@ReviewerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT HLShop_Review.*,HLShop_Product.ProductName \r\nFROM HLShop_Review\r\ninner join HLShop_Product On HLShop_Product.ProductID=HLShop_Review.ProductID\r\nWHERE  HLShop_Review.ReviewsID=@ReviewsID";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@ReviewsID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ReviewsID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "PR_GetReviewBySideStarShopID";
			this._commandCollection[6].CommandType = CommandType.StoredProcedure;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@Size", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@Star", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@ReviewID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "pr_SearchReview";
			this._commandCollection[7].CommandType = CommandType.StoredProcedure;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ReviewTitle", SqlDbType.VarChar, 100, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ReviewContent", SqlDbType.VarChar, 100, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@BeginReviewDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@endReviewDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@productid", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7].Parameters.Add(new SqlParameter("@ReviewerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "pr_InsertReview";
			this._commandCollection[8].CommandType = CommandType.StoredProcedure;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ShopID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ProductID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@UserName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewTitle", SqlDbType.VarChar, 200, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewContent", SqlDbType.VarChar, 800, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewStar", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewDate", SqlDbType.DateTime, 8, ParameterDirection.Input, 23, 3, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@TransSize", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewerName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@ReviewStatus", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9] = new SqlCommand();
			this._commandCollection[9].Connection = this.Connection;
			this._commandCollection[9].CommandText = "PR_Edit";
			this._commandCollection[9].CommandType = CommandType.StoredProcedure;
			this._commandCollection[9].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@strSQL", SqlDbType.VarChar, 1000, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10] = new SqlCommand();
			this._commandCollection[10].Connection = this.Connection;
			this._commandCollection[10].CommandText = "pr_UpdateReview";
			this._commandCollection[10].CommandType = CommandType.StoredProcedure;
			this._commandCollection[10].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@ReviewsID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@ReviewTitle", SqlDbType.VarChar, 200, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@ReviewContent", SqlDbType.VarChar, 800, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@ReviewStar", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetAllReview()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetAdminReview(string tblName, string strGetFields, string fldName, int? PageSize, int? PageIndex, int? OrderType, string strWhere, int? Counts)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (tblName == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = tblName;
			}
			if (strGetFields == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = strGetFields;
			}
			if (fldName == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = fldName;
			}
			if (PageSize.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = PageSize.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (PageIndex.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = PageIndex.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (OrderType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = OrderType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (strWhere == null)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = strWhere;
			}
			if (Counts.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[8].Value = Counts.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[8].Value = System.DBNull.Value;
			}
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetbargainorReviewCount(int? ReviewerID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (ReviewerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = ReviewerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetpurchaserReviewCount(int? ReviewerID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			if (ReviewerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = ReviewerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetReviewByReviewID(int ReviewsID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			this.Adapter.SelectCommand.Parameters[0].Value = ReviewsID;
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetReviewBySideStarShopID(int? Size, int? Star, int? UserID, int? ReviewID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			if (Size.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = Size.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (Star.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = Star.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (ReviewID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = ReviewID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_Review.HLShop_ReviewDataTable GetReviewForSearch(string ReviewTitle, string ReviewContent, string BeginReviewDate, string endReviewDate, int? productid, int? userid, int? ReviewerID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[7];
			if (ReviewTitle == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = ReviewTitle;
			}
			if (ReviewContent == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = ReviewContent;
			}
			if (BeginReviewDate == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = BeginReviewDate;
			}
			if (endReviewDate == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = endReviewDate;
			}
			if (productid.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = productid.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			if (userid.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = userid.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (ReviewerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[7].Value = ReviewerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[7].Value = System.DBNull.Value;
			}
			S_Review.HLShop_ReviewDataTable hLShop_ReviewDataTable = new S_Review.HLShop_ReviewDataTable();
			this.Adapter.Fill(hLShop_ReviewDataTable);
			return hLShop_ReviewDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_Review.HLShop_ReviewDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_Review dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_Review");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteReview(int ReviewsID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = ReviewsID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int InsertReviewer(int? ShopID, int? ProductID, int? UserID, string UserName, string ReviewTitle, string ReviewContent, int? ReviewStar, System.DateTime? ReviewDate, int? TransSize, int? ReviewerID, string ReviewerName, int? OrderID, int? ReviewStatus)
		{
			SqlCommand sqlCommand = this.CommandCollection[8];
			if (ShopID.HasValue)
			{
				sqlCommand.Parameters[1].Value = ShopID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (ProductID.HasValue)
			{
				sqlCommand.Parameters[2].Value = ProductID.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (UserID.HasValue)
			{
				sqlCommand.Parameters[3].Value = UserID.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (UserName == null)
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = UserName;
			}
			if (ReviewTitle == null)
			{
				sqlCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[5].Value = ReviewTitle;
			}
			if (ReviewContent == null)
			{
				sqlCommand.Parameters[6].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[6].Value = ReviewContent;
			}
			if (ReviewStar.HasValue)
			{
				sqlCommand.Parameters[7].Value = ReviewStar.Value;
			}
			else
			{
				sqlCommand.Parameters[7].Value = System.DBNull.Value;
			}
			if (ReviewDate.HasValue)
			{
				sqlCommand.Parameters[8].Value = ReviewDate.Value;
			}
			else
			{
				sqlCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (TransSize.HasValue)
			{
				sqlCommand.Parameters[9].Value = TransSize.Value;
			}
			else
			{
				sqlCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (ReviewerID.HasValue)
			{
				sqlCommand.Parameters[10].Value = ReviewerID.Value;
			}
			else
			{
				sqlCommand.Parameters[10].Value = System.DBNull.Value;
			}
			if (ReviewerName == null)
			{
				sqlCommand.Parameters[11].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[11].Value = ReviewerName;
			}
			if (OrderID.HasValue)
			{
				sqlCommand.Parameters[12].Value = OrderID.Value;
			}
			else
			{
				sqlCommand.Parameters[12].Value = System.DBNull.Value;
			}
			if (ReviewStatus.HasValue)
			{
				sqlCommand.Parameters[13].Value = ReviewStatus.Value;
			}
			else
			{
				sqlCommand.Parameters[13].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int PR_EditReview(string strSQL)
		{
			SqlCommand sqlCommand = this.CommandCollection[9];
			if (strSQL == null)
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = strSQL;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int pr_UpdateReview(int? ReviewsID, string ReviewTitle, string ReviewContent, int? ReviewStar)
		{
			SqlCommand sqlCommand = this.CommandCollection[10];
			if (ReviewsID.HasValue)
			{
				sqlCommand.Parameters[1].Value = ReviewsID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (ReviewTitle == null)
			{
				sqlCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[2].Value = ReviewTitle;
			}
			if (ReviewContent == null)
			{
				sqlCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				sqlCommand.Parameters[3].Value = ReviewContent;
			}
			if (ReviewStar.HasValue)
			{
				sqlCommand.Parameters[4].Value = ReviewStar.Value;
			}
			else
			{
				sqlCommand.Parameters[4].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
